#include <REGX52.H> 

sbit SCK=P3^6;
sbit SER=P3^4;
sbit RCK=P3^5;

unsigned char i=0;

void HC595_Write(unsigned char B){
	SCK=0;
	RCK=0;
	for(;i<=7;i++){
		SER=B&(0x80>>i);
		SCK=1;
		SCK=0;
	}
	RCK=1;
	RCK=0;
}

void LED_Show(unsigned char Column,B){
	P0=~(0x80>>Column);
	HC595_Write(B);
}

